﻿<Page x:Class="Road3App.Views.UserControls.EditControls.EditCellStatesPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:ucecc="clr-namespace:Road3App.Views.UserControls.EditControls.Crossroad"
      
      Title="EditCellStates">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        
        <TextBlock Text="Click on cell to change state" Grid.Row="0"/>

        <Grid Grid.Row="1" Margin="0,10">
            <ucecc:EditGridUC DataContext="{Binding CrossroadVM}"/>
        </Grid>

        <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
            <StackPanel.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="VerticalAlignment" Value="Center"/>
                    <Setter Property="Margin" Value="10,0"/>
                    <Setter Property="Width" Value="80"/>
                </Style>
                <Style TargetType="Rectangle">
                    <Setter Property="Width" Value="20"/>
                    <Setter Property="Height" Value="20"/>
                    <Setter Property="Stroke" Value="Black"/>
                </Style>
            </StackPanel.Resources>
                        
            <ucecc:CellUC DataContext="{Binding CellNoneState}"/>            
            <TextBlock Text="Regular road"/>
            <ucecc:CellUC DataContext="{Binding CellStartState}"/>
            <TextBlock Text="Start"/>
            <ucecc:CellUC DataContext="{Binding CellFinishState}"/>
            <TextBlock Text="Finish"/>
            <ucecc:CellUC DataContext="{Binding CellInaccessibleState}"/>
            <TextBlock Text="Inaccessible"/>
        </StackPanel>
    </Grid>
</Page>
